
  <!DOCTYPE html>
  <html lang="zh-CN"  >
  <head>
  <meta charset="utf-8">
  

  

  

  
  <script>window.icon_font = '4552607_tq6stt6tcg';window.clipboard_tips = {"success":"复制成功(*^▽^*)","fail":"复制失败 (ﾟ⊿ﾟ)ﾂ"};</script>
  
  
  <title>
    
    LBCH&#39;Blog
  </title>
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  <link rel="preconnect" href="https://fonts.gstatic.com/" crossorigin><link rel="preload" as="style" href="https://fonts.googleapis.com/css?family=Mulish:400,400italic,700,700italic%7CNoto%20Serif%20SC:400,400italic,700,700italic%7CUbuntu%20Mono:400,400italic,700,700italic&display=swap"><link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Mulish:400,400italic,700,700italic%7CNoto%20Serif%20SC:400,400italic,700,700italic%7CUbuntu%20Mono:400,400italic,700,700italic&display=swap" media="print" onload="this.media&#x3D;&#39;all&#39;">
  
    <link rel="preload" href="//at.alicdn.com/t/c/font_4552607_tq6stt6tcg.woff2" as="font" type="font/woff2" crossorigin="anonymous">
  
  
<link rel="stylesheet" href="/css/loader.css">

  <meta name="description" content="一个基础的博客网站">
<meta property="og:type" content="website">
<meta property="og:title" content="LBCH&#39;Blog">
<meta property="og:url" content="http://example.com/index.html">
<meta property="og:site_name" content="LBCH&#39;Blog">
<meta property="og:description" content="一个基础的博客网站">
<meta property="og:locale" content="zh_CN">
<meta property="article:author" content="LBCH">
<meta name="twitter:card" content="summary">
  
    <link rel="alternate" href="/atom.xml" title="LBCH'Blog" type="application/atom+xml">
  
  
    <link rel="shortcut icon" href="/images/favicon.ico">
  
  
<link rel="stylesheet" href="/css/style.css">

  
<link rel="stylesheet" href="https://npm.webcache.cn/photoswipe@5.4.4/dist/photoswipe.css">

  
  
  
  
<script src="https://npm.webcache.cn/pace-js@1.2.4/pace.min.js"></script>

  
    
<link rel="stylesheet" href="https://npm.webcache.cn/wowjs@1.1.3/css/libs/animate.css">

    
<script src="https://npm.webcache.cn/wowjs@1.1.3/dist/wow.min.js"></script>

    <script>
      new WOW({
        offset: 0,
        mobile: true,
        live: false
      }).init();
    </script>
  
  
    <script src="/sw.js"></script>
  
<meta name="generator" content="Hexo 7.2.0"></head>

  <body>
    
  <div id='loader'>
    <div class="loading-left-bg loading-bg"></div>
    <div class="loading-right-bg loading-bg"></div>
    <div class="spinner-box">
      <div class="loading-taichi">
        <svg width="150" height="150" viewBox="0 0 1024 1024" class="icon" version="1.1" xmlns="https://www.w3.org/2000/svg" shape-rendering="geometricPrecision">
          <path d="M303.5 432A80 80 0 0 1 291.5 592A80 80 0 0 1 303.5 432z" fill="#ff6e6b" />
          <path d="M512 65A447 447 0 0 1 512 959L512 929A417 417 0 0 0 512 95A417 417 0 0 0 512 929L512 959A447 447 0 0 1 512 65z" fill="#fd0d00" />
          <path d="M512 95A417 417 0 0 1 929 512A208.5 208.5 0 0 1 720.5 720.5L720.5 592A80 80 0 0 0 720.5 432A80 80 0 0 0 720.5 592L720.5 720.5A208.5 208.5 0 0 1 512 512A208.5 208.5 0 0 0 303.5 303.5A208.5 208.5 0 0 0 95 512A417 417 0 0 1 512 95" fill="#fd0d00" />
        </svg>
      </div>
      <div class="loading-word">少女祈祷中...</div>
    </div>
  </div>
  </div>
  <script>
    var time = null;
    var startLoading = () => {
      time = Date.now();
      document.getElementById('loader').classList.remove("loading");
    }
    var endLoading = () => {
      if (!time) {
        document.body.style.overflow = 'auto';
        document.getElementById('loader').classList.add("loading");
      } else {
        if (Date.now() - time > 500) {
          time = null;
          document.body.style.overflow = 'auto';
          document.getElementById('loader').classList.add("loading");
        } else {
          setTimeout(endLoading, 500 - (Date.now() - time));
          time = null;
        }
      }
    }
    window.addEventListener('DOMContentLoaded', endLoading);
    document.getElementById('loader').addEventListener('click', endLoading);
  </script>

<div id="copy-tooltip" style="pointer-events: none; opacity: 0; transition: all 0.2s ease; position: fixed;top: 50%;left: 50%;z-index: 999;transform: translate(-50%, -50%);color: white;background: rgba(0, 0, 0, 0.5);padding: 10px 15px;border-radius: 10px;">
</div>

    <div id="container">
      <div id="wrap">
        <div id="header-nav">
  <nav id="main-nav">
    
      <span class="main-nav-link-wrap">
        <span class="main-nav-icon"></span>
        <a class="main-nav-link" href="/">首页</a>
      </span>
    
      <span class="main-nav-link-wrap">
        <span class="main-nav-icon"></span>
        <a class="main-nav-link" href="/archives">归档</a>
      </span>
    
    <a id="main-nav-toggle" class="nav-icon"></a>
  </nav>
  <nav id="sub-nav">
    
      <a id="nav-rss-link" class="nav-icon" href="/atom.xml" title="RSS 订阅"></a>
    
    
    
  </nav>
</div>
<header id="header">
  
    
      <img fetchpriority="high" src="/images/banner.webp" alt="">
    
  
  <div id="header-outer" class="outer">
    <div id="header-title" class="inner">
      <div id="logo-wrap">
        
          
          
            <a href="/" id="logo">
              <h1>LBCH&#39;Blog</h1>
            </a>
          
        
      </div>
      
        
        <h2 id="subtitle-wrap">
          
            <a href="/" id="subtitle">属于LBCH的技术分享博客网站</a>
          
        </h2>
      
    </div>
  </div>
</header>

        <div id="content" class="outer">
          
          <section id="main">
  
  
  <div class="post-wrap-left wow fadeInUp">
    
      <a class="post-link" href="/2024/06/29/Python%E5%9F%BA%E7%A1%80/" aria-label="python基础"></a>
    
    
    <div class="post-cover-left">
      
        
        
          <img data-src="/images/banner.webp" data-sizes="auto" alt="python基础" class="lazyload">
        
      
    </div>
    <div class="post-info">
      <div class="post-meta">
        <span><span class="icon-calendar"></span>2024-06-29</span>
        <span><span class="icon-pencil"></span>207 字</span>
        <span><span class="icon-clock"></span>1 分钟</span>
      </div>
      <h2 class="post-title">python基础</h2>
      <article class="post-article">
        
          1. 输入和输出
输入

需要使用到input关键字, 从键盘上获取信息赋值给一个容器
代码示例:
12变量名 = input(提示语)print(变量名)




输出

可以在控制台显示变量的值或文字, 数字等信息
代码示例:
123变量名 = 变量值print(变量名)print(要输出的内容)



2. 注释为代码加上可以不被程序允许的解释, 方便自己或其他程序员阅读

单行注释 # 描述信息

​		通常放在一行代码的上方, 或者一条语句的末尾, 对该行代码说明

多行代码 &amp;#39;&amp;#39;&amp;#39;描述信息&amp;#39;&amp;#39;&amp;#39;

​		通常放在一段代码上方, 对该段
        
      </article>
    </div>
  </div>


  
  
  <div class="post-wrap-right wow fadeInUp">
    
    <a class="post-link" href="/2024/06/24/python%E8%87%AA%E5%88%B6%E7%A8%8B%E5%BA%8F%E5%88%86%E4%BA%AB/" aria-label="自制python程序分享"></a>
    
    <div class="post-cover-right">
      
        
        
          <img data-src="/images/banner.webp" data-sizes="auto" alt="自制python程序分享" class="lazyload">
        
      
    </div>
    <div class="post-info">
      <div class="post-meta">
        <span><span class="icon-calendar"></span>2024-06-24</span>
        <span><span class="icon-pencil"></span>92 字</span>
        <span><span class="icon-clock"></span>1 分钟</span>
      </div>
      <h2 class="post-title">自制python程序分享</h2>
      <article class="post-article">
        
          密码本这个程序方便我们管理自己的各种账户密码
源代码和打包好的程序如下, 点击即可下载
密码本.py 密码本.exe
爱心这个程序可以用来向自己心仪的女生表白
源代码和打包好的程序如下, 点击即可下载
爱心.py 爱心.exe

        
      </article>
    </div>
  </div>


  
  
  <div class="post-wrap-left wow fadeInUp">
    
      <a class="post-link" href="/2024/06/23/%E7%88%AC%E8%99%AB/" aria-label="python爬虫"></a>
    
    
    <div class="post-cover-left">
      
        
        
          <img data-src="/images/banner.webp" data-sizes="auto" alt="python爬虫" class="lazyload">
        
      
    </div>
    <div class="post-info">
      <div class="post-meta">
        <span><span class="icon-calendar"></span>2024-06-23</span>
        <span><span class="icon-pencil"></span>656 字</span>
        <span><span class="icon-clock"></span>2 分钟</span>
      </div>
      <h2 class="post-title">python爬虫</h2>
      <article class="post-article">
        
          爬虫的分类四大类

聚焦爬虫:完成某一特定数据的采集
通用爬虫:将所有的内容都去获取采集, 都存下来
增量爬虫:既可以是聚焦爬虫, 也可以是通用爬虫, 当数据变化时, 可以在原有的基础上增加内容
暗网&amp;#x2F;深网爬虫:很少见, 且暗网&amp;#x2F;深网本身就是违法的, 见不得光的, 既可以是聚焦爬虫, 也可以是通用爬虫, 同时又可以是增量爬虫

合法爬虫要想合法爬虫就需要遵守网络协议
1.机器人协议​	需要遵守网站相对应的robots(机器人)协议, 其中有详细描述什么可以爬或不可以爬
​	如想查看网站的robots协议, 可以在网站主页的URL后添加/robots.txt
​	国内比较顶级
        
      </article>
    </div>
  </div>


  
  
  <div class="post-wrap-right wow fadeInUp">
    
    <a class="post-link" href="/2024/06/14/C++%E5%9F%BA%E7%A1%80/" aria-label="c++基础"></a>
    
    <div class="post-cover-right">
      
        
        
          <img data-src="/images/banner.webp" data-sizes="auto" alt="c++基础" class="lazyload">
        
      
    </div>
    <div class="post-info">
      <div class="post-meta">
        <span><span class="icon-calendar"></span>2024-06-14</span>
        <span><span class="icon-pencil"></span>1.9k 字</span>
        <span><span class="icon-clock"></span>7 分钟</span>
      </div>
      <h2 class="post-title">c++基础</h2>
      <article class="post-article">
        
          一. 基础知识1. 文字的输入与输出
输入

相当于从键盘上获取信息赋值给一个容器
代码示例:
123456789#include&amp;lt;iostream&amp;gt;using namespace std;int main()&amp;#123;    数据类型 变量名;    cin &amp;gt;&amp;gt; 变量名;    cout &amp;lt;&amp;lt; 变量名 &amp;lt;&amp;lt; endl;&amp;#125;




输出

可以在控制台显示变量的值或文字, 数字等信息
代码示例:
123456#include&amp;lt;iostream&amp;gt;using namespace std;int main()&amp;#123;   
        
      </article>
    </div>
  </div>


  



</section>
          
            <aside id="sidebar">
  <div class="sidebar-wrap wow fadeInRight ">
    
      <div class="sidebar-author">
  <img data-src="/avatar/avatar.webp" data-sizes="auto" alt="LBCH" class="lazyload">
  <div class="sidebar-author-name">LBCH</div>
  <div class="sidebar-description">一个基础的博客网站</div>
</div>
<div class="sidebar-state">
  <div class="sidebar-state-article">
    <div>文章</div>
    <div class="sidebar-state-number">4</div>
  </div>
  <div class="sidebar-state-category">
    <div>分类</div>
    <div class="sidebar-state-number">0</div>
  </div>
  <div class="sidebar-state-tag">
    <div>标签</div>
    <div class="sidebar-state-number">0</div>
  </div>
</div>
<div class="sidebar-social">
  
    <div class="icon-email sidebar-social-icon">
      <a href=mailto:lbc110408@hotmail.com itemprop="url" target="_blank" aria-label="email"></a>
    </div>
  
    <div class="icon-github sidebar-social-icon">
      <a href=https://github.com/LiangBoCh itemprop="url" target="_blank" aria-label="github"></a>
    </div>
  
    <div class="icon-bilibili sidebar-social-icon">
      <a href=https://space.bilibili.com/1874212728 itemprop="url" target="_blank" aria-label="bilibili"></a>
    </div>
  
</div>
<div class="sidebar-menu">
  
    <div class="sidebar-menu-link-wrap">
      <a class="sidebar-menu-link-dummy" href="/" aria-label="首页"></a>
      <span class="sidebar-menu-icon"></span>
      <div class="sidebar-menu-link">首页</div>
    </div>
  
    <div class="sidebar-menu-link-wrap">
      <a class="sidebar-menu-link-dummy" href="/archives" aria-label="归档"></a>
      <span class="sidebar-menu-icon"></span>
      <div class="sidebar-menu-link">归档</div>
    </div>
  
</div>

    
    
  </div>

  
</aside>

          
        </div>
        <footer id="footer" class="wow fadeInUp">
  <div style="width: 100%; overflow: hidden">
    <div class="footer-line"></div>
  </div>
  <div class="outer">
    <div id="footer-info" class="inner">
      
      <div>
        <span class="icon-copyright"></span>
        2024-2024
        <span class="footer-info-sep"></span>
        LBCH
      </div>
      
        <div>
          基于&nbsp;<a href="https://hexo.io/" target="_blank">Hexo</a>&nbsp;
          Theme.<a href="https://github.com/D-Sketon/hexo-theme-reimu" target="_blank">Reimu</a>
        </div>
      
      
        <div>
          <span class="icon-brush"></span>
          2.9k
          &nbsp;|&nbsp;
          <span class="icon-coffee"></span>
          00:11
        </div>
      
      
        <div>
          <span class="icon-eye"></span>
          <span id="busuanzi_container_site_pv">总访问量&nbsp;<span id="busuanzi_value_site_pv"></span></span>
          &nbsp;|&nbsp;
          <span class="icon-user"></span>
          <span id="busuanzi_container_site_uv">总访客量&nbsp;<span id="busuanzi_value_site_uv"></span></span>
        </div>
      
    </div>
  </div>
</footer>

        <div class="sidebar-top">
          <img src="/images/taichi.png" height="50" width="50" alt="backtop" />
          <div class="arrow-up"></div>
        </div>
        <div id="mask"></div>
      </div>
      <nav id="mobile-nav">
  <div class="sidebar-wrap">
    
      <div class="sidebar-author">
  <img data-src="/avatar/avatar.webp" data-sizes="auto" alt="LBCH" class="lazyload">
  <div class="sidebar-author-name">LBCH</div>
  <div class="sidebar-description">一个基础的博客网站</div>
</div>
<div class="sidebar-state">
  <div class="sidebar-state-article">
    <div>文章</div>
    <div class="sidebar-state-number">4</div>
  </div>
  <div class="sidebar-state-category">
    <div>分类</div>
    <div class="sidebar-state-number">0</div>
  </div>
  <div class="sidebar-state-tag">
    <div>标签</div>
    <div class="sidebar-state-number">0</div>
  </div>
</div>
<div class="sidebar-social">
  
    <div class="icon-email sidebar-social-icon">
      <a href=mailto:lbc110408@hotmail.com itemprop="url" target="_blank" aria-label="email"></a>
    </div>
  
    <div class="icon-github sidebar-social-icon">
      <a href=https://github.com/LiangBoCh itemprop="url" target="_blank" aria-label="github"></a>
    </div>
  
    <div class="icon-bilibili sidebar-social-icon">
      <a href=https://space.bilibili.com/1874212728 itemprop="url" target="_blank" aria-label="bilibili"></a>
    </div>
  
</div>
<div class="sidebar-menu">
  
    <div class="sidebar-menu-link-wrap">
      <a class="sidebar-menu-link-dummy" href="/" aria-label="首页"></a>
      <span class="sidebar-menu-icon"></span>
      <div class="sidebar-menu-link">首页</div>
    </div>
  
    <div class="sidebar-menu-link-wrap">
      <a class="sidebar-menu-link-dummy" href="/archives" aria-label="归档"></a>
      <span class="sidebar-menu-icon"></span>
      <div class="sidebar-menu-link">归档</div>
    </div>
  
</div>

    
  </div>
  
</nav>

    </div>
    <div class="site-search">
      <div class="reimu-popup popup">
        <div class="reimu-search">
          <span class="reimu-search-input-icon"></span>
          <div class="reimu-search-input" id="reimu-search-input"></div>
        </div>
        <div class="reimu-results">
          <div id="reimu-stats"></div>
          <div id="reimu-hits"></div>
          <div id="reimu-pagination" class="reimu-pagination"></div>
        </div>
        <span class="popup-btn-close"></span>
      </div>
    </div>
    
<script src="https://npm.webcache.cn/lazysizes@5.3.2/lazysizes.min.js"></script>


<script src="https://npm.webcache.cn/clipboard@2.0.11/dist/clipboard.min.js"></script>



<script src="/js/script.js"></script>



<script src="/js/pjax_script.js" data-pjax></script>


<script type="module" data-pjax>
  import PhotoSwipeLightbox from "https://npm.webcache.cn/photoswipe@5.4.4/dist/photoswipe-lightbox.esm.js";
  
  const pswp = () => {
    if (_$$('.article-entry a.article-gallery-item').length > 0) {
      new PhotoSwipeLightbox({
        gallery: '.article-entry',
        children: 'a.article-gallery-item',
        pswpModule: () => import("https://npm.webcache.cn/photoswipe@5.4.4/dist/photoswipe.esm.js")
      }).init();
    }
    if(_$$('.article-gallery a.article-gallery-item').length > 0) {
      new PhotoSwipeLightbox({
        gallery: '.article-gallery',
        children: 'a.article-gallery-item',
        pswpModule: () => import("https://npm.webcache.cn/photoswipe@5.4.4/dist/photoswipe.esm.js")
      }).init();
    }
    window.lightboxStatus = 'done';
    window.removeEventListener('lightbox:ready', pswp);
  }
  if(window.lightboxStatus === 'ready') {
    pswp()
  } else {
    window.addEventListener('lightbox:ready', pswp);
  }
</script>
















  
<script src="https://npm.webcache.cn/mouse-firework@0.0.4/dist/index.umd.js"></script>

  <script>
    firework(JSON.parse('{"excludeElements":["a","button"],"particles":[{"shape":"circle","move":["emit"],"easing":"easeOutExpo","colors":["#ff5252","#ff7c7c","#ffafaf","#ffd0d0"],"number":20,"duration":[1200,1800],"shapeOptions":{"radius":[16,32],"alpha":[0.3,0.5]}},{"shape":"circle","move":["diffuse"],"easing":"easeOutExpo","colors":["#ff0000"],"number":1,"duration":[1200,1800],"shapeOptions":{"radius":20,"alpha":[0.2,0.5],"lineWidth":6}}]}'))
  </script>






<div id="lazy-script">
  <div>
    
  </div>
</div>


  <script>
    console.log(String.raw`%c 
 ______     ______     __     __    __     __  __    
/\  == \   /\  ___\   /\ \   /\ "-./  \   /\ \/\ \   
\ \  __<   \ \  __\   \ \ \  \ \ \-./\ \  \ \ \_\ \  
 \ \_\ \_\  \ \_____\  \ \_\  \ \_\ \ \_\  \ \_____\ 
  \/_/ /_/   \/_____/   \/_/   \/_/  \/_/   \/_____/ 
                                                  
`,'color: #ff5252;')
    console.log('%c Theme.Reimu v' + '0.2.0' + ' %c https://github.com/D-Sketon/hexo-theme-reimu ', 'color: white; background: #ff5252; padding:5px 0;', 'padding:4px;border:1px solid #ff5252;')
  </script>
  


  
<script src="https://npm.webcache.cn/busuanzi@2.3.0/bsz.pure.mini.js" async></script>


  <!-- hexo injector body_end start -->
<script src="/js/insert_highlight.js" data-pjax></script>
<!-- hexo injector body_end end --></body>
  </html>

